{{template "admin/public/head.html" .}}
<section>
	<aside>
		{{template "admin/public/nav.html" .}}
	</aside>
	<article>
		<div class="top-title">
			<dl>
				<dt><h1>{{.title}}</h1></dt>
				<dd>&nbsp;</dd>
				<dd><a href="wood_help.html"><i class="iconfont">&#xe649;</i>帮助文档</a></dd>
			</dl>
		</div>
		<!-- <div class="nav1">
			<ul>
				<a href="works_index.html" class="no"><li>全部产品</li></a>
				<a href="works_index.html"><li>产品分类</li></a>
				<a href="works_index.html"><li>产品分类</li></a>
				<a href="works_index.html"><li>产品分类</li></a>
				<a href="works_index.html"><li>产品分类</li></a>
				<a href="works_index.html"><li>产品分类</li></a>
			</ul>
		</div> -->
		<div class="content">
			<div class="release">
				<dl>
					<dt><i class="iconfont">&#xe649;</i> <b>{{.title}}说明</b><br>
						<!-- 请在发布产品时上传缩略图设计为正方形，防止前台显示图片变形<mark>图片变形</mark>。<br>
						<p>产品内容参数设置请尽量采用文字和表格形式，防止在手机端展示页面时候因为图片缩小而看不清楚参数内容。</p> -->
					</dt>
					<!-- <dd><a href="function_index.html"><button type="button" class="button">功能列表</button></a></dd> -->
				</dl>
			</div>

			<form action="" method="get" autocomplete="on" class="form">

				<table class="table1">
					<!-- 控制表格宽度  横向合并 colspan="1"  竖向合并 rowspan="3" -->
					<thead><th width="10%"></th><th width="15%"></th><th width="10%"></th><th width="15%"></th><th width="10%"></th><th width="15%"></th><th width="10%"></th><th width="15%"></th></thead>
					<tr>
						<td class="genre">管理员</td>
						<td colspan="3">
							<input type="text" class="input70" placeholder="请输入管理员ID！" list="uid" name="uid" value="{{.info.uid}}">
							<datalist id="uid">
							</datalist>
							<button type="button" class="inputbutton" data-type="member">搜索管理员</button>
						</td>
						<td class="genre">网站名称</td>
						<td colspan="3">
							<input type="text" class="input95" placeholder="请输入网站名称！" name="name" value="{{.info.name}}">
						</td>
					</tr>
					<tr>
						<td class="genre">最低提现金额</td>
						<td colspan="3">
							<input type="number" class="input95" placeholder="请输入最低提现金额！" name="cash" value="{{.info.cash}}">
						</td>
						<td class="genre">最低充值金额</td>
						<td colspan="3">
							<input type="number" class="input95" placeholder="请输入管理员ID！"  name="recharge" value="{{.info.recharge}}">
						</td>
					</tr>
					<tr>
						<td class="genre">店铺最低提现</td>
						<td colspan="3">
							<input type="number" class="input95" placeholder="请输入店铺最低提现！"  name="shopcash" value="{{.info.shopcash}}">
						</td>
						<td class="genre">平台产品价格倍数</td>
						<td colspan="3">
							<input type="number" class="input95" placeholder="请输入平台产品价格倍数！" name="mult" value="{{.info.mult}}">
						</td>
					</tr>
					<tr>
						<td class="genre">退货期限(天)</td>
						<td colspan="3">
							<input type="number" class="input95" placeholder="请输入退货期限(天)"  name="exile" value="{{.info.exile}}">
						</td>
						<td class="genre">换货期限(天)</td>
						<td colspan="3">
							<input type="number" class="input95" placeholder="请输入换货期限(天)" name="freight" value="{{.info.freight}}">
						</td>
					</tr>
					<tr>
						
						<td class="genre">税点</td>
						<td colspan="3">
							<input type="number" class="input95" placeholder="请输入税点！"  name="taxpoint" value="{{.info.taxpoint}}">
						</td>
						<td class="genre">余额红包功能</td>
						<td colspan="3">
							<label class="demo--label"><input class="demo--radio" type="radio" name="red" value="0" {{if .info}}{{if eq .info.red "0"}}checked{{end}}{{else}}checked{{end}}><span class="demo--radioInput"></span>关闭</label>
							<label class="demo--label"><input class="demo--radio" type="radio" name="red" value="1" {{if .info}}{{if eq .info.red "1"}}checked{{end}}{{end}}><span class="demo--radioInput"></span>开启</label>
						</td>
					</tr>
					<tr>
						<td class="genre">红包上限金额</td>
						<td colspan="3">
							<input type="number" class="input95" placeholder="请输入红包上限金额！"  name="redup" value="{{.info.redup}}">
						</td>
						<td class="genre">红包下限金额</td>
						<td colspan="3">
							<input type="number" class="input95" placeholder="请输入红包下限金额！" name="reddown" value="{{.info.reddown}}">
						</td>
					</tr>
					<tr>
						<td class="genre">pc搜索展示产品数</td>
						<td colspan="3">
							<input type="text" class="input95" placeholder="请输pc搜索展示产品数！"  name="pnum" value="{{.info.pnum}}">
						</td>
						<td class="genre">系统网址</td>
						<td colspan="3">
							<input type="text" class="input95" placeholder="请输入系统网址！"  name="url" value="{{.info.url}}">
						</td>
					</tr>
					<tr>
						<td class="genre">公司名称</td>
						<td colspan="3">
							<input type="text" class="input95" placeholder="请输入公司名称！" name="company" value="{{.info.company}}">
						</td>
						<td class="genre">关键词</td>
						<td colspan="3">
							<input type="text" class="input95" placeholder="请输入关键词！"  name="keywords" value="{{.info.keywords}}">
						</td>
					</tr>
					<tr>
						<td class="genre">简介</td>
						<td colspan="7">
							<textarea placeholder="请输入内容简介，200字内。" class="textarea95" name="description">{{.info.description}}</textarea>
						</td>
					</tr>
					<tr>
						<td class="genre">图片</td>
						<td colspan="7">
							<div class="thumbnail">
								<dl><dt><img src="{{.info.pathname}}" class="uppic"><input type="file" onchange="uppic(this,'system')" accept="image/gif,image/jpeg,image/jpg,image/png,image/svg">
									<input type="hidden" name="logo" value="{{.info.logo}}"></dt><dd>logo</dd><dd class="del_img">删除图片</dd></dl>
								<dl><dt><img src="{{.info.apathname}}" class="uppic"><input type="file" onchange="uppic(this,'system')" accept="image/gif,image/jpeg,image/jpg,image/png,image/svg">
								<input type="hidden" name="appqrcode" value="{{.info.appqrcode}}"></dt><dd>app二维码</dd><dd class="del_img">删除图片</dd></dl>
								<dl><dt><img src="{{.info.wpathname}}" class="uppic"><input type="file" onchange="uppic(this,'system')" accept="image/gif,image/jpeg,image/jpg,image/png,image/svg">
								<input type="hidden" name="wechatqrcode" value="{{.info.wechatqrcode}}"></dt><dd>微信二维码</dd><dd class="del_img">删除图片</dd></dl>
							</div>
						</td>
					</tr>
					<tr>
						<td class="genre">前端背景图</td>
						<td colspan="7">
							<div class="thumbnail">
								<dl><dt><img src="{{.info.gzhpath}}" class="uppic"><input type="file" onchange="uppic(this,'system')" accept="image/gif,image/jpeg,image/jpg,image/png,image/svg">
									<input type="hidden" name="logo" value="{{.info.gzhimg}}"></dt><dd>移动端背景图</dd><dd class="del_img">删除图片</dd></dl>
								<dl><dt><img src="{{.info.webpath}}" class="uppic"><input type="file" onchange="uppic(this,'system')" accept="image/gif,image/jpeg,image/jpg,image/png,image/svg">
								<input type="hidden" name="wechatqrcode" value="{{.info.webimg}}"></dt><dd>网站背景图</dd><dd class="del_img">删除图片</dd></dl>
							</div>
						</td>
					</tr>
					<tr>
						<td class="genre">客服热线</td>
						<td colspan="3">
							<input type="text" class="input95" placeholder="请输入客服热线！" class="tel" value="{{.info.tel}}">
						</td>
						<td class="genre">投诉热线</td>
						<td colspan="3">
							<input type="text" class="input95" placeholder="请输入投诉热线！"  name="complaints" value="{{.info.complaints}}">
						</td>
					</tr>
					<tr>
						<td class="genre">邮箱</td>
						<td colspan="3">
							<input type="text" class="input95" placeholder="请输入邮箱！" class="mail" value="{{.info.mail}}">
						</td>
						<td class="genre">传真</td>
						<td colspan="3">
							<input type="text" class="input95" placeholder="请输入传真！"  name="fax" value="{{.info.fax}}">
						</td>
					</tr>
					<tr>
						<td class="genre">负责人</td>
						<td colspan="2">
							<input type="text" class="input95" placeholder="请输入负责人！" class="person" value="{{.info.person}}">
						</td>
						<td class="genre">手机</td>
						<td colspan="2">
							<input type="text" class="input95" placeholder="请输入手机！"  name="mobile" value="{{.info.mobile}}">
						</td>
						<td class="genre">QQ</td>
						<td colspan="1">
							<input type="text" class="input95" placeholder="请输入QQ！"  name="qq" value="{{.info.qq}}">
						</td>
					</tr>
					<tr>
						<td class="genre">省/市/区</td>
						<td colspan="3">
							<select class="select30" name="province">
							{{range .province}}
							<option value="{{.code}}" {{if $.info.province}}{{if eq $.info.province .code}}selected{{end}}{{end}}>{{.name}}</option>
							{{end}}
							</select>
							<select class="select30" name="city">
							{{range .city}}
							<option value="{{.code}}" {{if $.info.city}}{{if eq $.info.city .code}}selected{{end}}{{end}}>{{.name}}</option>
							{{end}}
							</select>
							<select class="select30" name="area">
							{{range .area}}
							<option value="{{.code}}" {{if $.info.area}}{{if eq $.info.area .code}}selected{{end}}{{end}}>{{.name}}</option>
							{{end}}
							</select>
						</td>
						<td class="genre">详细地址</td>
						<td colspan="3">
							<input type="text" class="input95" placeholder="请输入详细地址！"  name="address" value="{{.info.address}}">
						</td>
					</tr>
					
					
					<!-- <tr>
						<td class="genre">开户行</td>
						<td colspan="3">
							<input type="text" class="input95" placeholder="请输入开户行！"  name="where" value="{{.info.where}}">
						</td>
						<td class="genre">收款银行</td>
						<td colspan="3">
							<input type="text" class="input95" placeholder="请输入收款银行！"  name="bank" value="{{.info.bank}}">
						</td>
					</tr>
					<tr>
						<td class="genre">收款帐号</td>
						<td colspan="3">
							<input type="text" class="input95" placeholder="请输入收款帐号！"  name="account" value="{{.info.account}}">
						</td>
						<td class="genre">收款名称</td>
						<td colspan="3">
							<input type="text" class="input95" placeholder="请输入收款名称！"  name="designation" value="{{.info.designation}}">
						</td>
					</tr> -->
					<!-- <tr>
						<td class="genre">微信公众号</td>
						<td colspan="3">
							<input type="text" class="input95" placeholder="请输入微信公众号！"  name="wechat" value="{{.info.wechat}}">
						</td>
						<td class="genre">微信公众号appid</td>
						<td colspan="3">
							<input type="text" class="input95" placeholder="请输入微信公众号appid！"  name="appid" value="{{.info.appid}}">
						</td>
					</tr>
					<tr>
						<td class="genre">微信公众号AppSecret</td>
						<td colspan="3">
							<input type="text" class="input95" placeholder="请输入微信公众号AppSecret！"  name="appsecret" value="{{.info.appsecret}}">
						</td>
						<td class="genre">微信公众号到期时间</td>
						<td colspan="3">
							<input type="text" class="input95" placeholder="请选择微信公众号到期时间！"  name="expirationtime" value="{{.info.expirationtime}}" readonly="">
						</td>
					</tr> -->
					<!-- <tr>
						<td class="genre">微信支付商户号</td>
						<td colspan="3">
							<input type="text" class="input95" placeholder="请输入微信支付商户号！"  name="wechatmerchant" value="{{.info.wechatmerchant}}">
						</td>
						<td class="genre">微信支付密钥</td>
						<td colspan="3">
							<input type="text" class="input95" placeholder="请输入微信支付密钥！"  name="wechatkey" value="{{.info.wechatkey}}" >
						</td>
					</tr>
					<tr>
						<td class="genre">支付宝公众号appid</td>
						<td colspan="3">
							<input type="text" class="input95" placeholder="请输入支付宝公众号appid！"  name="alipayappid" value="{{.info.alipayappid}}">
						</td>
						<td class="genre">支付宝公众号AppSecret</td>
						<td colspan="3">
							<input type="text" class="input95" placeholder="请输入支付宝公众号AppSecret！"  name="alipayas" value="{{.info.alipayas}}" >
						</td>
					</tr>
					<tr>
						<td class="genre">支付宝公众号到期时间</td>
						<td colspan="3">
							<input type="text" class="input95" placeholder="请选择支付宝公众号到期时间！"  name="alipaytime" value="{{.info.alipaytime}}" readonly="">
						</td>
						<td class="genre">支付宝支付商户号</td>
						<td colspan="3">
							<input type="text" class="input95" placeholder="请输入支付宝支付商户号！"  name="alipaymerchant" value="{{.info.alipaymerchant}}" >
						</td>
					</tr> -->
					<!-- <tr>
						<td class="genre">支付宝支付密钥</td>
						<td colspan="3">
							<input type="text" class="input95" placeholder="请输入支付宝支付密钥！"  name="alipaykey" value="{{.info.alipaykey}}">
						</td>
						<td class="genre">ICP备案号</td>
						<td colspan="3">
							<input type="text" class="input95" placeholder="请输入ICP备案号！"  name="icp" value="{{.info.icp}}">
						</td>
					</tr> -->
					<tr>
						<td class="genre">分享代码</td>
						<td colspan="7">
							<input type="text" class="input95" placeholder="请输入分享代码！"  name="sharing" value="{{.info.sharing}}">
						</td>
					</tr>
					<tr>
						<td class="genre">统计代码</td>
						<td colspan="7">
							<input type="text" class="input95" placeholder="请输入统计代码！"  name="statistics" value="{{.info.statistics}}" >
						</td>
					</tr>
					<tr>
						<td colspan="8">
							<script type="text/javascript" src="https://api.map.baidu.com/api?v=2.0&ak=pZNN8yCbWXBezCgGpnKMQi283dFLAVGO"></script>
							<div class="map">
								<div class="mapcontent" id="allmap"></div>
							</div>
							
						</td>
					</tr>
					<tr>
						<td class="genre">地址</td>
						<td colspan="3">
							<input type="text" class="input95" placeholder="请输入地址！"  id="address">
						</td>
						<td class="genre">坐标</td>
						<td colspan="3">
							<input type="text" class="input95" placeholder="点击地图选取坐标！"  name="coordinate" value="{{.info.coordinate}}" >
						</td>
					</tr>
					<input type="hidden" name="id" value="{{.info.id}}">
			</form>
					<tr class="trbutton">
						<td colspan="2"><button type="button" class="button">保存</button></td>
						<td colspan="6">
							<p>
								<i class="iconfont">&#xe649;</i> 请检查内容确认发布的内容没有涉及传播谣言、政治话题或违反广告法夸大宣传产品等。
							</p>
							<div class="help">帮助
								<div class="help_qr"><img src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/all/qr-code.jpg" alt=""></div>
							</div>
						</td>
					</tr>
				</table>
		</div>
	</article>
</section>

<footer><!-- 系统监控内容 --></footer>
<script src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/admin/js/jquery.jedate.min.js"></script>
<script src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/admin/js/toast.js"></script>
<script src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/admin/js/uppic.js"></script>
<script src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/admin/js/xcConfirm.js"></script>
<script src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/admin/js/app.js"></script>
<script type="text/javascript">
	$('select[name="province"]').change(function(){
		var code=$(this).val()
		$.ajax({
			url:'/area_get',
			data:{code:code},
			success:function(res){
				console.log(res)
				var html=``
				for(var i=0;i<res.length;i++){
					html+=`<option value="`+res[i].code+`">`+res[i].name+`</option>`
					if(i==0){
						var html2=``
						for(var j=0;j<res[0].son.length;j++){
							html2+=`<option value="`+res[0].son[j].code+`">`+res[0].son[j].name+`</option>`
						}
						$('select[name="area"]').html(html2)
					}
				}
				$('select[name="city"]').html(html)
			}
		})
	})
	$('select[name="city"]').change(function(){
		var code=$(this).val()
		$.ajax({
			url:'/area_get',
			data:{code:code},
			success:function(res){
				var html=``
				for(var i=0;i<res.length;i++){
					html+=`<option value="`+res[i].code+`">`+res[i].name+`</option>`
				}
				$('select[name="area"]').html(html)
			}
		})
	})
</script>
<script>
    // 百度地图API功能
    var map = new BMap.Map("allmap");
    var coor=[121.363158,28.5921]
    {{if .info}}
    var coors={{.info.coordinate}}
    coors=coors.split(",")
    coor[0]=coors[0]
    coor[1]=coors[1]
    {{end}}
    var point = new BMap.Point(coor[0],coor[1]);
    map.centerAndZoom(point, 15);
    var marker = new BMap.Marker(point);  // 创建标注
    map.addOverlay(marker);               // 将标注添加到地图中
    marker.setAnimation(BMAP_ANIMATION_BOUNCE); //跳动的动画
    var local = new BMap.LocalSearch(map, {
        renderOptions:{map: map}
    });
    $('#address').change(function() {
        var xyz=$(this).val()
        local.search(xyz);
    });
    map.addEventListener("click",function(e){
        $('input[name="coordinate"]').val(e.point.lng + "," + e.point.lat);
    });
</script>
<script>
	$("input[name=expirationtime]").jeDate({
	    isinitVal:false,
	    festival: false,
	    isToday:true, 
	    format: 'YYYY-MM-DD hh:mm:ss'
	});
	$("input[name=alipaytime]").jeDate({
	    isinitVal:false,
	    festival: false,
	    isToday:true, 
	    format: 'YYYY-MM-DD hh:mm:ss'
	});
	$('.button').click(function(){
		var form=$('form').serialize()
		$.ajax({
			url:window.location.href,
			data:form,
			type:'post',
			success:function(res){
				if(res==1){
					 window.wxc.xcConfirm("保存成功","success",{onClose:function(){
                       history.go(0)
                    }})
				}else {
					 window.wxc.xcConfirm("保存失败,请重试!","error")
				}
			}
		})
	});
</script>
</body>
</html>
